package com.demo.salary.transactionimplementation;

import com.demo.salary.payrollimplementation.MonthlySchedule;
import com.demo.salary.payrolldomain.PaymentClassification;
import com.demo.salary.payrolldomain.PaymentSchedule;
import com.demo.salary.abstracttransactions.ChangeClassificationTransaction;
import com.demo.salary.payrollimplementation.SalariedClassification;

public class ChangeSalaryTransaction extends ChangeClassificationTransaction {

    double salary;

    public ChangeSalaryTransaction(int empId, double salary) {
        super(empId);
        this.salary = salary;
    }

    @Override
    public  PaymentSchedule getSchedule() {
        return new MonthlySchedule();
    }

    @Override
    public PaymentClassification getClassification() {
        return new SalariedClassification(salary);
    }
}
